/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package WebService;

import BusinessLayer.BusinessLayerInterface;
import BusinessLayer.BLInterfaceHandler;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.UriInfo;
import javax.ws.rs.Consumes;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.GET;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;

/**
 * REST Web Service
 *
 * @author zorr
 */
@Path("getGame")
public class GetGameResource {

    @Context
    private UriInfo context;

    /** Creates a new instance of GetGameResource */
    public GetGameResource() {
    }

    /**
     * Retrieves representation of an instance of WebService.GetGameResource
     * @return an instance of java.lang.String
     */
    @GET
    @Produces("application/xml")
    public String getXml(@QueryParam("username") String username, @QueryParam("gameId") int gameId) {
        BusinessLayerInterface bli = new BLInterfaceHandler();
        return bli.getGame(username, gameId);
    }

    /**
     * PUT method for updating or creating an instance of GetGameResource
     * @param content representation for the resource
     * @return an HTTP response with content of the updated or created resource.
     */
    @PUT
    @Consumes("application/xml")
    public void putXml(String content) {
    }
}
